{extend name="public:base" /}

{block name="content"}
<link href="/static/laydate/theme/default/laydate.css">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-content">
                    <form method="post">
                    <div class="box-item layui-form-item adminj-sort-item" >
                        <div class="form-group row">
                            <label class="col-sm-1 col-form-label layui-form-label">赠品名称</label>
                            <div class="col-sm-3">
                                <input type="text" name="gift_name" value="{$info['gift_name']}" class="form-control">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                    </div>
                    <div class="box-item layui-form-item adminj-sort-item" >
                        <div class="form-group row">
                            <label class="col-sm-1 col-form-label layui-form-label">封面图片<br><small class="text-navy">建议尺寸：100px*100px</small></label>
                            <div class="col-sm-3">
                                <input type="file" id="img_file" style="display: none" name="gift_img">
                                <input type="hidden" name="gift_img" id="img" value="{$info['gift_img']}">
                                <img class="upload-file" onclick="uploadImg('img_file', 'img', 'upload_img')" id="upload_img" src="{$info.gift_img?getPicture($info.gift_img):'/static/admin/img/uploadBtn.png'}">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                    </div>
                    <div class="box-item layui-form-item adminj-sort-item" >
                        <div class="form-group row">
                            <label class="col-sm-1 col-form-label layui-form-label">赠品价格</label>
                            <div class="col-sm-3">
                                <input type="text" name="gift_price" class="form-control" value="{$info['gift_price']?$info['gift_price']:0}">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                    </div>
                    <div class="box-item layui-form-item adminj-sort-item" >
                        <div class="form-group row">
                            <label class="col-sm-1 col-form-label layui-form-label">赠品开始时间</label>
                            <div class="col-sm-3">
                                <input type="text" name="start_date" class="form-control screen-date" value="{$info['start_date']}">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                    </div>
                    <div class="box-item layui-form-item adminj-sort-item" >
                        <div class="form-group row">
                            <label class="col-sm-1 col-form-label layui-form-label">赠品结束时间</label>
                            <div class="col-sm-3">
                                <input type="text" name="end_date" class="form-control screen-date" value="{$info['end_date']}">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                    </div>

                        <input type="hidden" name="id" value="{$info['id']}">

                        <div class="form-group row">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button type="button" class="btn btn-w-m btn-default back-page">返回</button>
                                <button type="button" class="btn btn-w-m btn-primary ajax-post">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

{/block}

{block name='js'}
<script src="/static/laydate/laydate.js"></script>
<script type="text/javascript" src="__PLUG__/kindeditor/kindeditor-all.js"></script>
<script>
    <!-- 实例化编辑器 -->
    initKindEditor('editor_id');
    laydate.render({
        elem: '.screen-date' //指定元素
    });
</script>
{/block}
